import Vue from 'vue'
import ElementUI from 'element-ui';
import App from './App'
import store from './store'
import router from './router'
import 'element-ui/lib/theme-chalk/index.css';
// import '@/utils/flexible'
import "./utils/px2rem"
import "./assets/css/font.css"
import '@/assets/styles/index.scss' 

import '@vuemap/vue-amap/dist/style.css'
import VueAMap from '@vuemap/vue-amap';
import '@vuemap/vue-amap/dist/style.css'
Vue.use(VueAMap);
VueAMap.initAMapApiLoader({
  key: '578b2d78d734144b4b9fd22922e6c476',  // 高德key
  securityJsCode: 'e91e106a61017dbcb4d58119b815e4a8', // 新版key需要配合安全密钥使用
  plugins: ['AMap.DistrictSearch']
});
// key 578b2d78d734144b4b9fd22922e6c476/48279e101f9c15387bd3945eed25e133
// securityJsCode e91e106a61017dbcb4d58119b815e4a8/71f081de3c2ccd8f3bb22a176ec46afe

// import directive from './directive' //directive

import Pop from '@/components/pop/index';//翻牌器
Vue.component('Pop', Pop);
import Flipper from '@/components/flipper/index';//翻牌器
Vue.component('Flipper', Flipper);
import FlipperBig from '@/components/flipper/big';//翻牌器大号
Vue.component('FlipperBig', FlipperBig);
import ItemLargeBox from '@/components/item-box/index-large';//大边框内容
Vue.component('ItemLargeBox', ItemLargeBox);
import ItemBox from '@/components/item-box/index';//大边框内容
Vue.component('ItemBox', ItemBox);
// import ItemRourerBox from '@/components/item-box/router-view.vue';//大边框内容
// Vue.component('ItemRourerBox', ItemRourerBox);
import TransverseTI from '@/components/image-text/transverse';//左图右边文字组件
Vue.component('TransverseTI', TransverseTI);
import DirectionTI from '@/components/image-text/direction';//上图下边文字组件
Vue.component('DirectionTI', DirectionTI);
import SubContentBox from '@/components/item-box/sub-content';//副边框内容
Vue.component('SubContentBox', SubContentBox);
import ElementTabPane from "@/components/element-ui/tab-pane/index.vue"; //菜单切换
Vue.component('ElementTabPane', ElementTabPane);
import ElementSelect from "@/components/element-ui/select/index.vue"; //下拉选择
Vue.component('ElementSelect', ElementSelect);
import ElementTabPaneDate from "@/components/element-ui/tab-pane/date.vue"; //菜单切换(日期选择)
Vue.component('ElementTabPaneDate', ElementTabPaneDate);
import TradeDetail from '@/components/TradeDetail'
Vue.component('TradeDetail', TradeDetail);

// echart
import Nodata from "@/components/NoData" /* 引入无数据提示 */
Vue.component('Nodata', Nodata);
// import EchartsLiquidFill from "@/components/echarts/liquidFill/index.vue"//水球图
// Vue.component('EchartsLiquidFill', EchartsLiquidFill);

// import EchartsBarTop from "@/components/echarts/bar/top.vue"//排行榜
// Vue.component('EchartsBarTop', EchartsBarTop);
// import EchartsBarRow from "@/components/echarts/bar/row.vue"//横向柱状图
// Vue.component('EchartsBarRow', EchartsBarRow);

// import EchartsProgress from "@/components/echarts/bar/progress.vue"//进度条
// Vue.component('EchartsProgress', EchartsProgress);

// import EchartsPieImg from "@/components/echarts/pie/img.vue"//圆环背景图
// Vue.component('EchartsPieImg', EchartsPieImg);
import EchartsMoreLine from "@/components/echarts/line/moreLine.vue"//多条线图
Vue.component('EchartsMoreLine', EchartsMoreLine);
import EchartsMoreLineAlter from "@/components/echarts/line/moreLine2.vue"//多条线图
Vue.component('EchartsMoreLineAlter', EchartsMoreLineAlter);
import EchartsBar from "@/components/echarts/bar/bar.vue"//标准柱状图
Vue.component('EchartsBar', EchartsBar);
import EchartsBarLine from "@/components/echarts/bar/barLine.vue"//柱线图
Vue.component('EchartsBarLine', EchartsBarLine);
import EchartsLine from "@/components/echarts/line/line.vue"//柱线图
Vue.component('EchartsLine', EchartsLine);
import EchartsPie from "@/components/echarts/pie/pie.vue"//圆环图
Vue.component('EchartsPie', EchartsPie);
import EchartsPercentage from "@/components/echarts/pie/percentage.vue"//圆环百分比图
Vue.component('EchartsPercentage', EchartsPercentage);
import EchartsPieLabel from "@/components/echarts/pie/pieLabel.vue"//圆环图-label
Vue.component('EchartsPieLabel', EchartsPieLabel);
import EchartsGauge from "@/components/echarts/gauge/index.vue"//仪表盘
Vue.component('EchartsGauge', EchartsGauge);
import * as echarts from 'echarts';
import 'echarts-liquidfill'
import Modal from '@/components/modal'
Vue.component('Modal', Modal);
import InfoList from "@/components/InfoList"
Vue.component('InfoList', InfoList);
// import 'echarts-liquidfill'
import {
  getRecent7Hours,
  parseTime,
  resetForm,
  addDateRange,
  selectDictLabel,
  selectDictLabels,
  handleTree,
  getCustomizeDay,
  randomNum,
  getRecentWeekDates
} from "@/utils/ruoyi";
// 全局方法挂载
Vue.prototype.parseTime = parseTime
Vue.prototype.$randomNum = randomNum
Vue.prototype.$getRecent7Hours = getRecent7Hours
Vue.prototype.$getRecentWeekDates = getRecentWeekDates
Vue.prototype.$getCustomizeDay = getCustomizeDay
Vue.prototype.resetForm = resetForm
Vue.prototype.addDateRange = addDateRange
Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.handleTree = handleTree


//日期格式化
import moment from "moment"
Vue.prototype.$moment = moment;
//引入echarts
// import echarts from 'echarts'
Vue.prototype.$echarts = echarts










/**
 * If you don't want to use mock-server
 * you want to use MockJs for mock api
 * you can execute: mockXHR()
 *
 * Currently MockJs will be used in the production environment,
 * please remove it before going online! ! !
 */

/**
 * 根据屏幕变化，自动更改 html 的 font-size
 */
// Vue.use(Element, {
//   size: Cookies.get('size') || 'medium' // set element-ui default size
// })
Vue.use(ElementUI,{
  size:  'mini' // set element-ui default size
});
Vue.use(VueAMap)

Vue.config.devtools = true;

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
// window.Vue = Vue
